<?php
namespace app\admin\controller;

class Shopget extends Come{
    public function shopget(){

        $reslist	=	db('admin_shop')->paginate(5);
        //	把分页数据赋值给模板变量list
        $this->assign('reslist',$reslist);
        //	渲染模板输出
        return	$this->fetch('shopget');
        
        // $user	=	model('Shop');

        // $res	=	$user->get(6);
        // $ret=$user->getStatusAttr($res['display']);

        // $ret=$user->setImgSrcAttr($res['img']);

        
        // dump($ret);
        
    }
    public function delete(){
        $delId=input('param.delId','','htmlspecialchars');
        $res=db('admin_shop')->where('id',$delId)->delete();
        if($res>0){
            $this->success('删除成功!','admin/shopget/shopget');
        }else{
            $this->error('删除失败');
        }
    }
}